﻿using AiXiu.Model;
using AiXiu.Model.Vod;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AiXiu.Common;

namespace AiXiu.IBLL
{
    public interface IVideoBLL
    {
        /// <summary>
        /// 上传视频到阿里云，并保存信息到数据库
        /// </summary>
        /// <param name="title">视频标题</param>
        /// <param name="fileName">文件名称</param>
        /// <param name="location">上传地址</param>
        /// <param name="userId">上传视频的用户的Id</param>
        /// <returns>上传凭证</returns>
        CreateUploadVideoResult uploadVideo(string title, string fileName, string location, int userId);
        /// <summary>
        /// 更新视频状态
        /// </summary>
        /// <returns>更新的数量</returns>
        int UpdateVideoState();

        /// <summary>
        /// 获取视频列表
        /// </summary>
        /// <returns></returns>
        List<TBVideos> GetVideosList();

        /// <summary>
        /// 通过Id获取视频信息
        /// </summary>
        /// <returns></returns>
        TBVideos GetVideoById(string videoId);

        /// <summary>
        /// 获取播放视频凭证
        /// </summary>
        /// <param name="videoId">播放视频的Id</param>
        /// <returns></returns>
        GetPlayInfoResult InitPlay(string videoId);

        /// <summary>
        /// 根据用户Id获取视频列表
        /// </summary>
        /// <param name="UserId">用户Id</param>
        /// <returns></returns>
        List<MyVideoModel> GetTBVideosByUserId(int userId);

        /// <summary>
        /// 删除用户信息
        /// </summary>
        /// <param name="videoId">视频Id</param>
        /// <returns></returns>
        OperResult DeleteVideo(string videoId);
    }
}
